<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition template="/templates/user_template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:define name="title">
        Chocolor:Preview order
    </ui:define>

	<ui:define name="content">
		<p:panelGrid style="margin-top:20px; width:100%; border-style:hidden"
			id="addOrderForm">
			<f:facet name="header">
				<p:row>
					<p:column style="border-style:hidden" colspan="2">Your order: </p:column>
				</p:row>
			</f:facet>

			<p:row>
				<p:column style="width:200px; border-style:hidden">Client:</p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.email}</p:column>
				<p:column
					style="width:10%; border-style:hidden; background-color:white"></p:column>
			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Order date:</p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.orderDraftDate}</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Article:	</p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.articleId}	</p:column>
			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Logotype: </p:column>
				<p:column style="border-style:hidden">
					<h:form>
						<p:commandButton value="View logotype" ajax="false"
							immediate="true">
							<p:fileDownload
								value="#{previewOrderBean.getBufferDownloadFile()}" />
						</p:commandButton>
					</h:form>
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Inscription: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.inscription}
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Frame: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.hasFrame}
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Chocolate type: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.getChocolateRawType()}
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Packing: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.getPackingType()}
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Logo colour: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.logoColour}
				</p:column>

			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Inscription colour: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.inscriptionColour}
				</p:column>

			</p:row>
			<p:row>
				<p:column style="border-style:hidden">Plato colour: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.platoColour}
					</p:column>
			</p:row>

			<p:row>
				<p:column style="border-style:hidden">Body colour: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.bodyColour}
					</p:column>

			</p:row>


			<p:row>
				<p:column style="border-style:hidden">Quantity: </p:column>
				<p:column style="border-style:hidden">#{previewOrderBean.orderDraft.quantity}
					</p:column>

			</p:row>

			<f:facet name="footer">
				<p:row>
					<p:column style="text-align:left; border-style:hidden" colspan="2">
						<h:form><!-- 
							<c:if test="#{previewOrderBean.mode == 'add'}"> -->
								<p:commandButton value="Confirm order" id="addOrder"
									ajax="false" action="#{addOrderBean.addOrder()}"
									icon="ui-icon-check" />
								<p:commandButton value="Return to editing" id="return"
									disabled="true" ajax="false"
									action="#{addOrderBean.returnToEditing()}" />
	<!-- 						</c:if>
							<c:if test="#{previewOrderBean.mode == 'edit'}">
								<p:commandButton value="Confirm order" id="addOrder"
									ajax="false" action="#{editOrderBean.editOrder()}"
									icon="ui-icon-check" />
								<p:commandButton value="Return to editing" id="return"
									disabled="true" ajax="false"
									action="#{editOrderBean.returnToEditing()}" />
							</c:if> -->
						</h:form>
					</p:column>
				</p:row>

			</f:facet>
		</p:panelGrid>
	</ui:define>
</ui:composition>
